InPlace editing

Hello,

Maybe some of you is familiar with DOORS in-place editing.
What I want to achieve is to take over control of in-place editor for given attribute.
Particularly I'm interested in controlling listView in-place editor, like one provided for enumerated attributes.
This request may seem strange, but the rationale is that using here enumeration attribute is not suitable due to large amount of choices per module.
For each object this choice set is much limited, partially due to construction of data model.

Basically, I'd like to choose which list options are available for choosing and which are not.

In addition there is trigger involved which reacts on clicking attribute column. This is nest what I could figure out, maybe you have better ideas?
 

const string ATTR = "Attribute A"
 
void evObject(Trigger t) {
    Object obj = object(t)
        Module mod = module(t)
        Column c = column(getInPlaceColumnIndex(mod))
        if(attrName(c) == ATTR) {
                inplaceEditOff(mod, false)
                infoBox("You are editing " ATTR)
        }
}
trigger(module->"Module A"->object, open, 10, evObject)

 


Right now I'm only able to run external GUI DXL, but this is not very seamless.
I found this functions below in undocumented functions list, they seems to be facilitating with in-place editing, but I have no idea how to use them.

 

 

 

void   inPlaceChoiceAdd(DBE da, string item)
int    inPlaceTextHeight(DBE da)
void   inPlacePaste(DBE da, InPlaceBox__ which)
void   inPlaceCopy (DBE da, InPlaceBox__ which)
void   inPlaceCut  (DBE da, InPlaceBox__ which)
void   inPlaceReset(DBE da, InPlaceBox__ which)
int    inPlaceGet  (DBE da, InPlaceBox__ which)
string inPlaceGet  (DBE da, InPlaceBox__ which)
void   inPlaceSet  (DBE da, InPlaceBox__ which, string s)
void   inPlaceMove (DBE da, InPlaceBox__ which, int x, int y, int w, int h)
void   inPlaceShow (DBE da, InPlaceBox__ which, bool showing)
void   hasInPlace(DBE da, void cb(DBE, InPlaceEditEvent, int))
void   hasInPlace(DBE da, void cb(DBE, InPlaceEditEvent))



How can I take over control of enumerated list in-place editor?
If this text seems to vague for you, I'm more than pleased to give more explanations.

BR, Jarek



 

 


SystemAdmin - Wed Mar 03 09:50:00 EST 2010

Re: InPlace editing
SystemAdmin - Thu Mar 04 08:51:15 EST 2010

Well, couple of possibilities:

Have a look at a SmartDXL script http://www.smartdxl.com/content/?page_id=34 if that would work for your

I have done something similar to your description, but in my implemention the attributes to be edited were normal Text type attributes and the trigger (based on column gotten from getInPlaceColumnIndex) popped up a dialog showing possible values read from another module or module attribute. Maybe this way would be easier than try modify how DOORS edits enumerated attributes.

Re: InPlace editing
SystemAdmin - Thu Mar 04 10:45:58 EST 2010

SystemAdmin - Thu Mar 04 08:51:15 EST 2010
Well, couple of possibilities:

Have a look at a SmartDXL script http://www.smartdxl.com/content/?page_id=34 if that would work for your

I have done something similar to your description, but in my implemention the attributes to be edited were normal Text type attributes and the trigger (based on column gotten from getInPlaceColumnIndex) popped up a dialog showing possible values read from another module or module attribute. Maybe this way would be easier than try modify how DOORS edits enumerated attributes.

Hi,

Thanks for the replay. In fact I did something similar what you discribed. But still I believe that taking over this in-place editor would be more convinient for end users.
I didn't gave up yet ;>
To be ohnest I found that functions mentioned by me before are somehow documented, though I don't feel very educated by theirs explanation.

Other problems that I stuck on with current solution are:

1. When I close the dialog box (which is modal) even if I don't do anything, explorer window is brought up on top. My current solution is to bring on top current module window, but it causes "window flickering". It's very quick, but noticable.

Consider following code:
 

DB g_dbMain
void evOK(DB dbWin) {
    release(g_dbMain)
        hide(dbWin)     
}
void evClose(DB dbWin) {
        release(g_dbMain)
        hide(dbWin)     
}
void setupApp() {
        g_dbMain = create("Modal")
        apply(g_dbMain, "OK", evOK)
        close(g_dbMain, true, evClose)
        block(g_dbMain)
}
setupApp()

 


When you invoke it from module context, and then close the dialog, explorer window pops on top not the module window.
Can this be done better?

2. The newly created dialog box tend to pop up in different parts of the screen. I'm not yet sure how to position it over the edited column yet.

/Jarek

 

Re: InPlace editing
PHowstan - Fri Jul 09 08:52:06 EDT 2010

SystemAdmin - Thu Mar 04 10:45:58 EST 2010

Hi,

Thanks for the replay. In fact I did something similar what you discribed. But still I believe that taking over this in-place editor would be more convinient for end users.
I didn't gave up yet ;>
To be ohnest I found that functions mentioned by me before are somehow documented, though I don't feel very educated by theirs explanation.

Other problems that I stuck on with current solution are:

1. When I close the dialog box (which is modal) even if I don't do anything, explorer window is brought up on top. My current solution is to bring on top current module window, but it causes "window flickering". It's very quick, but noticable.

Consider following code:
 

DB g_dbMain
void evOK(DB dbWin) {
    release(g_dbMain)
        hide(dbWin)     
}
void evClose(DB dbWin) {
        release(g_dbMain)
        hide(dbWin)     
}
void setupApp() {
        g_dbMain = create("Modal")
        apply(g_dbMain, "OK", evOK)
        close(g_dbMain, true, evClose)
        block(g_dbMain)
}
setupApp()

 


When you invoke it from module context, and then close the dialog, explorer window pops on top not the module window.
Can this be done better?

2. The newly created dialog box tend to pop up in different parts of the screen. I'm not yet sure how to position it over the edited column yet.

/Jarek

 

Hi,

The Create function can accept a DB or Module as its first parameter meaning the dialog will be shown over the supplied DB or module, but more importantly, will return to the supplied dialog or module once it is hidden or released.

Hope this helps,

Paul

Re: InPlace editing
a_vestlin - Mon Jul 12 04:50:19 EDT 2010

SystemAdmin - Thu Mar 04 10:45:58 EST 2010

Hi,

Thanks for the replay. In fact I did something similar what you discribed. But still I believe that taking over this in-place editor would be more convinient for end users.
I didn't gave up yet ;>
To be ohnest I found that functions mentioned by me before are somehow documented, though I don't feel very educated by theirs explanation.

Other problems that I stuck on with current solution are:

1. When I close the dialog box (which is modal) even if I don't do anything, explorer window is brought up on top. My current solution is to bring on top current module window, but it causes "window flickering". It's very quick, but noticable.

Consider following code:
 

DB g_dbMain
void evOK(DB dbWin) {
    release(g_dbMain)
        hide(dbWin)     
}
void evClose(DB dbWin) {
        release(g_dbMain)
        hide(dbWin)     
}
void setupApp() {
        g_dbMain = create("Modal")
        apply(g_dbMain, "OK", evOK)
        close(g_dbMain, true, evClose)
        block(g_dbMain)
}
setupApp()

 


When you invoke it from module context, and then close the dialog, explorer window pops on top not the module window.
Can this be done better?

2. The newly created dialog box tend to pop up in different parts of the screen. I'm not yet sure how to position it over the edited column yet.

/Jarek

 

Hi,

You can create the modal dialog with style 'styleSubWindow' which will raise the module window when the dialog is closed:

Module m = current
DB db = create(m, "Modal", styleSubWindow)
block(db)


/Anders